@import 'var';

bz-nav-tab {
  display: block;
  position: relative;
  height: $layout-nav-tab-height;
  border-bottom: solid 1px $grey-4;
  user-select: none;
  font-size: $large-font-size;

  &:hover {

    .arrow-left,
    .arrow-right {
      visibility: visible;
    }
  }
}

bz-nav-tab .arrow-left,
bz-nav-tab .arrow-right {
  visibility: hidden;
  position: absolute;
  top: 0;
  width: $box-space;
  height: 100%;
  text-align: center;
  line-height: $layout-nav-tab-height;
  font-size: 10px;
  color: $grey-8;
  cursor: pointer;

  &:hover {
    color: $primary-color;
  }

  &.end {
    color: rgba($grey-8, 0.5);
    cursor: not-allowed;
  }
}

bz-nav-tab .arrow-left {
  left: 0;
}

bz-nav-tab .arrow-right {
  right: 0;
}

bz-nav-tab .tab-container {
  position: absolute;
  left: $box-space;
  overflow-x: scroll;
  overflow-y: hidden;
  width: calc(100% - #{$box-space*2});
  height: calc(100% + 20px);

  .tab-container-wrapper {
    white-space: nowrap;
  }

  a,
  i {
    color: $nav-tab-item-color;
  }

  a.first-visit {
    font-weight: 800;
  }

  .tab-item {
    position: relative;
    display: inline-block;
    height: $layout-nav-tab-height;
    line-height: $layout-nav-tab-height;
    padding: 0 8px 0 12px;
    vertical-align: middle;
    cursor: pointer;

    &.tab-item-fixed {
      padding: 0 12px;

      .item-content {
        margin-right: unset;
        width: unset;
      }
    }

    &:first-of-type {
      padding: 0 8px 0 20px;
    }

    &:first-of-type.tab-item-fixed {
      padding: 0 36px 0 20px;
    }

    i.close {
      vertical-align: top;
      color: $grey-7;
    }

    .nav-back {
      padding: 0.5em;
      margin: -0.5em;
    }

    .item-content {
      display: inline-block;
      // width: 8em;
      min-width: 100px;
      vertical-align: top;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      margin-right: 3px;
      color: $grey-8;
      font-weight: 700;
    }

    &:hover {
      a {
        color: $aside-menu-active-color;
      }

      .nav-back {
        color: darken($aside-menu-active-color, 20%) !important;
      }
    }

    &.active {
      // border-bottom: solid 2px $aside-menu-active-color;

      a {
        color: $aside-menu-active-color;
      }
    }

    &:after {
      position: absolute;
      right: 0;
      border-right: solid $grey-5 1px;
      top: 20%;
      height: 60%;
      content: '';
    }
  }
}
